<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台--文章管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>images/style.css" />
    <base target="_self"/>

    <script src='<?php echo isset($skin)?$skin:"";?>js/jquery.min.js'></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/jquery.form.min.js"></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/dist/dialog-min.js"></script>
    <script src="<?php echo isset($skin)?$skin:"";?>js/admin.js"></script>
    <script type="text/javascript">
        <!--
        $(document).ready(function () {
            $('.new_table tbody tr:even').addClass('h'); //奇偶变色，添加样式
        });
        //-->
    </script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>/js/validate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate-plugin.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/form.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artDialog.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/iframeTools.js"></script>
<link rel="stylesheet" href="<?php echo isset($skin)?$skin:"";?>js/artdialog.css" type="text/css">
</head>
<body>
<div class="hh6"></div>
<script type="text/javascript">
<!--
//分组权限全选
function checkGroupAll(obj,nameVal)
{
    if(obj.checked == true)
    {
        $('#col_'+nameVal+' [name="purviews[]"]').attr('checked',true);
    }
    else
    {
        $('#col_'+nameVal+' [name="purviews[]"]').attr('checked',false);
    }
}

//-->
</script>
<form method="Post" name="k_form" action="?c=<?php echo isset($classname)?$classname:"";?>&a=update">
    <table id="senfe" class="new_table" width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <thead> <tr class="n_bt"><td colspan="9" align="center">工作小助手系统</td></tr>
		<tr><th colspan='9' class="thbt">【<?php echo isset($title)?$title:"";?>】</th></tr>
	</thead>
        <tbody id="bstable">
            <tr> 
                <td>&nbsp;&nbsp;组名称：</td>
                <td> <input name="rolename" type="text" disabled id="typename" value="<?php echo isset($oj->rolename)?$oj->rolename:"";?>"> 
                </td>
            </tr>
            <tr> 
                <td>&nbsp;&nbsp;说明信息：</td>
                <td> <input name="roleinfo" type="text" disabled id="typename" value="<?php echo isset($oj->roleinfo)?$oj->roleinfo:"";?>"> 
                </td>
            </tr>
            <?php if(is_array($column))  foreach($column as $k=>$v) { ?>
            <tr> 
                <td height='25' colspan='2' >&nbsp;&nbsp;<?php echo isset($v->columnname)?$v->columnname:"";?> <input type='checkbox' id='checkbox_<?php echo isset($v->columnname)?$v->columnname:"";?>' onclick='checkGroupAll(this,"<?php echo isset($v->columnname)?$v->columnname:"";?>");' />全选</label></td></tr>
            <tr><td height='25' colspan='2' id="col_<?php echo isset($v->columnname)?$v->columnname:"";?>" >&nbsp;&nbsp;
                    <?php
                    $sql="select `actionid`,`actionname`,`unique` from __action where columnid=".$v->columnid.' order by rank asc';
                    $res=db::_query($sql);
                    while($r=db::_object($res)){
                    ?>
                    <input name='purviews[]' type='checkbox' <?php if(in_array($r->unique,$rights)){?> checked<?php }?> value='<?php echo isset($r->unique)?$r->unique:"";?>' /><?php echo isset($r->actionname)?$r->actionname:"";?>
                           <?php }?>

                </td></tr>
            <?php }?>
            <tr>
                <td height="35" colspan="2" align="center" ><input name="into_wz" id="submit" class="button" type="submit" value="提交" />
                    &nbsp;<input name="" type="reset" class="button" value="重置" />
                    <input name="id" type="hidden" value="<?php echo isset($id)?$id:"";?>" />
                </td>
            </tr>
        </tbody>
    </table>
</form>
<div id="tip" style="display: none;width:100px;height: 23px;background: #FFAE00;color: #f00;position: absolute;left:50%;top:50%;text-align: center;line-height: 23px;">设置成功!</div>
</body>
</html>